
#include "idhelloworldadapter.h"
#include <QCoreApplication>
#include <QTextStream>
#include <QDebug>

#include <QDBusConnection>
#include <QDBusInterface>
#include <QDBusReply>

#include <IDHelloWorld/IDHelloWorld.h>

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    // QDBusInterface *interface = new QDBusInterface("com.qt.examples.DHelloWorld",
    //                                                 "/", "com.qt.examples.DHelloWorld",
    //                                                 QDBusConnection::sessionBus());

//    IDHelloWorld *dhello = new IDHelloWorld();
//    QObject::connect(dhello, &IDHelloWorld::broadcastMessage, [](QString msg)
//    {
//        LogUtils::log("Subscribe: " + msg);
//    });
    new IDHelloWorldAdapter([](QString msg)
    {
        LogUtils::log("Subscribe: " + msg);
    });


    return a.exec();
}

